-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split up Windows tests relying on urlunparse behaviour #12788
Split up Windows tests relying on urlunparse behaviour #12788
Conversation
Ah, there's another case I missed. Will fix that up EDIT: fixed and squashed into the single commit |
042d655
to
ebdd028
Compare
tests/lib/__init__.py
Outdated
# versions containing fix/backport from https://github.com/python/cpython/pull/113563 | ||
# which changed the behavior of `urllib.parse.urlun{parse,split}` | ||
has_new_urlun_behavior = ( | ||
# https://github.com/python/cpython/commit/387ff96e95b9f8a8cc7e646523ba3175b1350669 | ||
(sys.version_info[:2] == (3, 12) and sys.version_info >= (3, 12, 4)) | ||
or | ||
# https://github.com/python/cpython/commit/872000606271c52d989e53fe4cc9904343d81855 | ||
(sys.version_info[:2] == (3, 13) and sys.version_info >= (3, 13, 0, "beta", 2)) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of trying to check versions, would it be better if we just try to parse one URL to determine the version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of trying to check versions, would it be better if we just try to parse one URL to determine the version?
Good idea, that will save us having to update these versions. Trying that with f9e5477
There was a behavioural change to `urllib.parse.urlunparse`[1] that affects some of our tests on Windows. With the understanding that the new behaviour is indeed desired, split up some tests relying on this behaviour depending on the version of Python. The sample URL used to check this behaviour was taken from a test in the upstream change (with the new behaviour this URL will round-trip parsing) [1] python/cpython#113563
f9e5477
to
16f0617
Compare
Windows is not really my domain anymore, but I just wanted to say thank you for helping us unbreak CI. It's been 🔴 a lot in the past few months, and getting it to stay 🍏 has been a real chore, so thank you :) |
There was a behavioural change to
urllib.parse.urlunparse
[1] thataffects some of our tests on Windows. With the understanding that the
new behaviour is indeed desired, split up some tests relying on this
behaviour depending on the version of Python.
The sample URL used to check this behaviour was taken from a test in the
upstream change (with the new behaviour this URL will round-trip
parsing)
[1] python/cpython#113563